package com.niit.repository.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.stereotype.Service;
import com.niit.repository.bean.User;
import com.niit.repository.repository.UserRepository;
import com.niit.repository.service.UserService;

@Service("userService")
public class UserServiceImpl implements UserService {

    @Autowired
    private UserRepository userRepository;

    @Override
    public Page<User> findAll(Specification<User> spec,Pageable pageable) {
        Page<User> page = userRepository.findAll(spec, pageable);
        return page;
    }
}

